package cz.boxdesing.vizitky.server.common.impl;

import javax.ejb.SessionContext;

import org.springframework.context.access.ContextSingletonBeanFactoryLocator;
import org.springframework.ejb.support.AbstractStatelessSessionBean;


public abstract class BoxSessionBean extends AbstractStatelessSessionBean {

  public static final String PRIMARY_CONTEXT_ID = "businessBeanFactory";

  @Override
  public void setSessionContext(SessionContext sessionContext) {
    super.setSessionContext(sessionContext);
    setBeanFactoryLocator(ContextSingletonBeanFactoryLocator.getInstance());
    setBeanFactoryLocatorKey(PRIMARY_CONTEXT_ID);
  }
}
